﻿using System;
using System.Configuration;
using System.Diagnostics;
using System.Reflection;

namespace JenkinsBuild
{
    class Program
    {
        static void Main(string[] args)
        {
            string svnRevision = ConfigurationManager.AppSettings.Get("svn-revision");
            Console.WriteLine("Hello world");
            Console.WriteLine("Hello again");
            Console.WriteLine("goodbye");
            Console.WriteLine("SVN VERSION " + svnRevision);

            Version version = Assembly.GetExecutingAssembly().GetName().Version;

            int build = version.Build;
            int revision = version.Revision;

            DateTime dateTimeOfBuild = new DateTime(2000, 1, 1)
                                            + new TimeSpan(build, 0, 0, 0)
                                            + TimeSpan.FromSeconds(revision * 2);
            Console.WriteLine(dateTimeOfBuild.ToString());
        }
    }
}
